package com.wang.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wang.dao.Custom2ReturnMapper;
import com.wang.pojo.Custom2Return;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wcy
 * @date 2024-07-30 15:01
 */
@Service
public class Custom2ReturnServiceImpl extends ServiceImpl<Custom2ReturnMapper,Custom2Return> implements Custom2ReturnService {

    @Autowired
    private Custom2ReturnMapper custom2ReturnMapper;

    @Override
    public List<Custom2Return> selectListByControlId(Integer controlId) {
        return custom2ReturnMapper.selectList(new LambdaQueryWrapper<Custom2Return>().eq(Custom2Return::getControlId,controlId));
    }

    @Override
    public Custom2Return selectOneByControlId(Integer controlId) {
        return custom2ReturnMapper.selectOne(new LambdaQueryWrapper<Custom2Return>().eq(Custom2Return::getControlId,controlId));
    }
}
